import allure
from selenium.webdriver.common.by import By
from Base.Base import Base

class Page(Base):

    fm_loc = (By.XPATH,'/html/body/div[3]/div[3]/div[1]/div/div[3]/div[1]/div[2]/iframe')

    @allure.step("buujsdin")
    def fm(self):
        self.frame(self.fm_loc)

    username_loc = (By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/input')
    def username(self):
        self.send_keys(self.username_loc,'19064013675')

    password_loc = (By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[3]/div[2]/input[2]')
    def password(self):
        self.send_keys(self.password_loc,'zhang185050.')

    log_bt_loc = (By.XPATH,'/html/body/div[2]/div[2]/div[2]/form/div/div[8]/a')
    def log_bt(self):
        self.click(self.log_bt_loc)

    def wy_email_login_001(self):
        self.open_url('https://mail.163.com/')
        self.fm()
        self.username()
        self.password()
        self.log_bt()